package weifei.live.simulation.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.springframework.stereotype.Repository;


@Data
@EqualsAndHashCode(callSuper = true)
@TableName("trade_area_group")
@Repository
public class TradeAreaGroup extends Model<TradeAreaGroup>
{

    @Getter
    public enum Column
    {
        ID("id"),
        TradeAreaID("trade_area_id"),
        GroupID("group_id");

        final String name;
        Column(String name) { this.name = name; }
    }

    @TableId
    private Integer id;
    @NotNull
    private Integer tradeAreaId;
    @NotNull
    private Integer groupId;


    public TradeAreaGroup() {}
    public TradeAreaGroup(int id) { this.id = id; }
}


